package com.cxm.helper.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: chenximeng
 * @date: 2022/12/3 13:56
 */
@Getter
@AllArgsConstructor
public enum MessageBusinessTypeEnum {

    ARTICLE(1, "帖子"),

    ;

    Integer code;
    String name;

    public static MessageBusinessTypeEnum getEnumByCode(Integer code) {
        for (MessageBusinessTypeEnum item : MessageBusinessTypeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }
}
